const A = 100;
const B = 300;
cc.Class({
    extends: cc.Component,

    properties: {
       nd_mask:cc.Node,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.rad = 0;
    },

    start () {
        this.nd_mask.setScale(0.6,0.6);
        let zoomin = cc.scaleTo(0.9,1.5);
        let zoomout = cc.scaleTo(0.9,0.6);
        let seq = cc.sequence(zoomin,zoomout);
        let repeatforever = cc.repeatForever(seq);
        this.nd_mask.runAction(repeatforever);
    },

    update (dt) {
        this.rad += dt;
        let rad = this.rad;
        let x = Math.cos(rad) * A;
        let y = Math.sin(rad) * B;
        this.nd_mask.setPosition(x,y);
    },

    back_btnClicked(){
        cc.director.loadScene('entry/mainScene');
    },
});
